// components/index/index-swiper/index-swiper.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    list: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    background: ['https://source.unsplash.com/750x200?fruit,1', 
                'https://source.unsplash.com/750x200?fruit,2'],
    indicatorDots: true,
    vertical: false,
    autoplay: false,
    interval: 2000,
    duration: 500
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goTo(e){
      console.log("er", e);
      const url = e.currentTarget.dataset.url;
      console.log("url", url);
      if(url){
        wx.navigateTo({url});
      }
    }
  }
})
